Optimal. Leaf size=77 \[ \frac {a^2 \tanh ^{-1}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a+b}}\right )}{b^{5/2} \sqrt {a+b} d}-\frac {(a-b) \tanh (c+d x)}{b^2 d}-\frac {\tanh ^3(c+d x)}{3 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4231, 398, 214}
\begin {gather*} \frac {a^2 \tanh ^{-1}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a+b}}\right )}{b^{5/2} d \sqrt {a+b}}-\frac {(a-b) \tanh (c+d x)}{b^2 d}-\frac {\tanh ^3(c+d x)}{3 b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 398
Rule 4231
Rubi steps
\begin {align*} \int \frac {\text {sech}^6(c+d x)}{a+b \text {sech}^2(c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^2}{a+b-b x^2} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (-\frac {a-b}{b^2}-\frac {x^2}{b}+\frac {a^2}{b^2 \left (a+b-b x^2\right )}\right ) \, dx,x,\tanh (c+d x)\right )}{d}\\ &=-\frac {(a-b) \tanh (c+d x)}{b^2 d}-\frac {\tanh ^3(c+d x)}{3 b d}+\frac {a^2 \text {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\tanh (c+d x)\right )}{b^2 d}\\ &=\frac {a^2 \tanh ^{-1}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a+b}}\right )}{b^{5/2} \sqrt {a+b} d}-\frac {(a-b) \tanh (c+d x)}{b^2 d}-\frac {\tanh ^3(c+d x)}{3 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(214\) vs. \(2(77)=154\).
time = 1.50, size = 214, normalized size = 2.78 \begin {gather*} \frac {(a+2 b+a \cosh (2 (c+d x))) \text {sech}^2(c+d x) \left (3 a^2 \tanh ^{-1}\left (\frac {\text {sech}(d x) (\cosh (2 c)-\sinh (2 c)) ((a+2 b) \sinh (d x)-a \sinh (2 c+d x))}{2 \sqrt {a+b} \sqrt {b (\cosh (c)-\sinh (c))^4}}\right ) (\cosh (2 c)-\sinh (2 c))+\sqrt {a+b} \text {sech}(c+d x) \sqrt {b (\cosh (c)-\sinh (c))^4} \left (\text {sech}(c) \left (-3 a+2 b+b \text {sech}^2(c+d x)\right ) \sinh (d x)+b \text {sech}(c+d x) \tanh (c)\right )\right )}{6 b^2 \sqrt {a+b} d \left (a+b \text {sech}^2(c+d x)\right ) \sqrt {b (\cosh (c)-\sinh (c))^4}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(182\) vs.
\(2(67)=134\).
time = 1.84, size = 183, normalized size = 2.38
method | result | size |
derivativedivides | \(\frac {\frac {2 \left (-a +b \right ) \left (\tanh ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 \left (-2 a +\frac {2 b}{3}\right ) \left (\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 \left (-a +b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{b^{2} \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {2 a^{2} \left (-\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}\right )}{b^{2}}}{d}\) | \(183\) |
default | \(\frac {\frac {2 \left (-a +b \right ) \left (\tanh ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 \left (-2 a +\frac {2 b}{3}\right ) \left (\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 \left (-a +b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{b^{2} \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {2 a^{2} \left (-\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}+\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {b}+\sqrt {a +b}\right )}{4 \sqrt {b}\, \sqrt {a +b}}\right )}{b^{2}}}{d}\) | \(183\) |
risch | \(\frac {2 a \,{\mathrm e}^{4 d x +4 c}+4 a \,{\mathrm e}^{2 d x +2 c}-4 b \,{\mathrm e}^{2 d x +2 c}+2 a -\frac {4 b}{3}}{b^{2} d \left (1+{\mathrm e}^{2 d x +2 c}\right )^{3}}+\frac {a^{2} \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {a b +b^{2}}+2 b \sqrt {a b +b^{2}}-2 a b -2 b^{2}}{a \sqrt {a b +b^{2}}}\right )}{2 \sqrt {a b +b^{2}}\, d \,b^{2}}-\frac {a^{2} \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {a b +b^{2}}+2 b \sqrt {a b +b^{2}}+2 a b +2 b^{2}}{a \sqrt {a b +b^{2}}}\right )}{2 \sqrt {a b +b^{2}}\, d \,b^{2}}\) | \(220\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 160 vs.
\(2 (67) = 134\).
time = 0.51, size = 160, normalized size = 2.08 \begin {gather*} -\frac {a^{2} \log \left (\frac {a e^{\left (-2 \, d x - 2 \, c\right )} + a + 2 \, b - 2 \, \sqrt {{\left (a + b\right )} b}}{a e^{\left (-2 \, d x - 2 \, c\right )} + a + 2 \, b + 2 \, \sqrt {{\left (a + b\right )} b}}\right )}{2 \, \sqrt {{\left (a + b\right )} b} b^{2} d} - \frac {2 \, {\left (6 \, {\left (a - b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, a e^{\left (-4 \, d x - 4 \, c\right )} + 3 \, a - 2 \, b\right )}}{3 \, {\left (3 \, b^{2} e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, b^{2} e^{\left (-4 \, d x - 4 \, c\right )} + b^{2} e^{\left (-6 \, d x - 6 \, c\right )} + b^{2}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 832 vs.
\(2 (67) = 134\).
time = 0.39, size = 1905, normalized size = 24.74 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {sech}^{6}{\left (c + d x \right )}}{a + b \operatorname {sech}^{2}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.61, size = 118, normalized size = 1.53 \begin {gather*} \frac {\frac {3 \, a^{2} \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} + a + 2 \, b}{2 \, \sqrt {-a b - b^{2}}}\right )}{\sqrt {-a b - b^{2}} b^{2}} + \frac {2 \, {\left (3 \, a e^{\left (4 \, d x + 4 \, c\right )} + 6 \, a e^{\left (2 \, d x + 2 \, c\right )} - 6 \, b e^{\left (2 \, d x + 2 \, c\right )} + 3 \, a - 2 \, b\right )}}{b^{2} {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{3}}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.99, size = 334, normalized size = 4.34 \begin {gather*} \frac {8}{3\,b\,d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )}-\frac {4}{b\,d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )}+\frac {2\,a}{b^2\,d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {a^2\,\ln \left (\frac {4\,a^2\,\left (2\,a\,b+a^2+a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+8\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+8\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^5\,\left (a+b\right )}-\frac {8\,a^2\,\left (a+2\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}+4\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^{9/2}\,\sqrt {a+b}}\right )}{2\,b^{5/2}\,d\,\sqrt {a+b}}+\frac {a^2\,\ln \left (\frac {8\,a^2\,\left (a+2\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}+4\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^{9/2}\,\sqrt {a+b}}+\frac {4\,a^2\,\left (2\,a\,b+a^2+a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+8\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+8\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^5\,\left (a+b\right )}\right )}{2\,b^{5/2}\,d\,\sqrt {a+b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________